import axios from 'axios';

const instance = axios.create({
    baseURL: 'http://localhost:5500', // 根据您的后端地址调整
    timeout: 30000, // 设置超时时间为30秒
});

export const uploadImage = (files, modelName) => {
    const formData = new FormData();
    files.forEach(file => {
        formData.append('images', file);
    });
    return instance.post('/process_image', formData);
}; 